package cn.hicard.risk.service.bd.impl;

import java.util.List;

import org.springframework.stereotype.Service;

import cn.hicard.risk.dao.bd.PeriodFreezeDao;
import cn.hicard.risk.entity.BdPeriodfreeze;
import cn.hicard.risk.service.bd.PeriodFreezeService;

@Service
public class PeriodFreezeServiceImpl implements PeriodFreezeService{
	
	private PeriodFreezeDao periodFreezeDao;
	
		
	public void setPeriodFreezeDao(PeriodFreezeDao periodFreezeDao) {
		this.periodFreezeDao = periodFreezeDao;
	}

	/**
	 * 保存冻结数据
	 */
	public void save(BdPeriodfreeze periodfreeze) throws Exception{
		periodFreezeDao.save(periodfreeze);
	}
	
	
	/**
	 * 更新冻结数据
	 */
	public void updateList(List<BdPeriodfreeze> list) throws Exception{
		periodFreezeDao.updateList(list);
	}
	
	/**
	 * 根据条件查询交易数据集合
	 */
	public List<BdPeriodfreeze> findList(BdPeriodfreeze start, BdPeriodfreeze end) throws Exception{
		return periodFreezeDao.findList(start, end);
	}
	
	public List<String> findLastDate(String date) throws Exception{
		return periodFreezeDao.findLastDate(date);
	}
   
	public void updateFreezeState(BdPeriodfreeze periodfreeze) throws Exception{
		periodFreezeDao.updateFreezeState(periodfreeze);
	}
	
	public boolean existPos(int pkTradefileinfo) throws Exception {
		return periodFreezeDao.existPos(pkTradefileinfo);
	}
}
